<?php

class PlayerInformation {

    private $playerID;
    private $firstname;
    private $lastname;
    private $gender;
    private $address;
    private $phone;

    function __construct() {
        
    }

    public function getPlayerID() {
        return $this->playerID;
    }

    public function getFirstname() {
        return $this->firstname;
    }

    public function getLastname() {
        return $this->lastname;
    }

    public function getGender() {
        return $this->gender;
    }

    public function getAddress() {
        return $this->address;
    }

    public function getPhone() {
        return $this->phone;
    }

    public function setPlayerID($playerID) {
        $this->playerID = $playerID;
    }

    public function setFirstname($firstname) {
        $this->firstname = $firstname;
    }

    public function setLastname($lastname) {
        $this->lastname = $lastname;
    }

    public function setGender($gender) {
        $this->gender = $gender;
    }

    public function setAddress($address) {
        $this->address = $address;
    }

    public function setPhone($phone) {
        $this->phone = $phone;
    }

    function insertPlayerInformation($conn) {
        $strInsert = "INSERT INTO playerinformation(PlayerID,FirstName,LastName,Gender,Address,Phone) "
                . "VALUES('$this->playerID','$this->firstname','$this->lastname','$this->gender','$this->address','$this->phone')";
        mysqli_query($conn, "SET NAMES utf8");
        $strQuery = mysqli_query($conn, $strInsert);
    }

}
